# 指定架构
export ARCH = arm64
# 交叉编译器前缀（注意后面跟短横线）
export CROSS_COMPILE = /home/topeet/linux/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-

# 要编译的模块
obj-m := dev_t.o

# 内核源码目录
KDIR  := /home/topeet/linux/rk356x_linux/kernel
PWD   := $(shell pwd)

all:
	$(MAKE) -C $(KDIR) M=$(PWD) modules

clean:
	$(MAKE) -C $(KDIR) M=$(PWD) clean

# 开发板挂载指令：
# mount -t nfs -o nfsvers=3,nolock 169.254.69.199:/home/nfs /mnt/
# sudo cp dev_t.ko /home/nfs/
# cat /proc/devices